
module.exports = function ($scope, $state, $stateParams,$resource,$modal,items,$modalInstance,FileUploader) {
    console.log(items);
    $scope.a=items;
    $scope.info={'photo':''};
    $scope.applyarr=[
    {name:'区县项目',value:'0'},
    {name:'市级项目',value:'1'},
]


$scope.array = $scope.a.guide_pdf.split(',');
                    console.log($scope.array);
                    for(var i = 0;i<$scope.array.length;i++){
                        if($scope.array[i]==''){
                            $scope.array.splice(i,1);
                        }
                    }    
$scope.submit = function(){

    var para = {  
        guide_name:$scope.name,   
        guide_type:$scope.guide_type
     }

     console.log(para);
     $resource('/api/as/ggc/reviewGuide/create', {}, {}).save(para, function(res){
            // console.log(res);
            if(res.errcode === 0){                      
                alert('提交成功');  
                 $modalInstance.close();
            }else{
                alert(res.errmsg);
            }
        });
}
			


};
